class Phone:
    __is_5g_enable = None  # ture为开启，false为关闭

    def __check_5g(self):
        if self.__is_5g_enable == True:
            print("5g开启")
        else:
            print("5g关闭，使用4g网络")

    def call_by_5g(self, msg):
        self.__is_5g_enable = msg
        self.__check_5g()
        print("正在通话中")


phone01 = Phone()
phone01.call_by_5g(True)
phone01.call_by_5g(False)
